package com.blb.zy_community.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.ZyRepair;
import com.blb.zy_community.mapper.ZyRepairMapper;
import com.blb.zy_community.service.IZyRepairService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 报修信息 服务实现类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Service
public class ZyRepairServiceImpl extends ServiceImpl<ZyRepairMapper, ZyRepair> implements IZyRepairService {
    @Autowired
    private ZyRepairMapper zyRepairMapper;

    @Override
    public Page<ZyRepair> getZyRepairPage(Page page, String repairState, String ownerName, String ownerPhoneNumber) {
        Page<ZyRepair> zyRepairPage= zyRepairMapper.selectZyRepairPage(page,repairState,ownerName,ownerPhoneNumber);
        return zyRepairPage;
    }

    @Override
    public List<ZyRepair> selectZyRepairByUserId(Long ownerId) {
        return zyRepairMapper.selectZyRepairByUserId(ownerId);
    }
}
